#include "inputsize.h"
#include "common/DarkStyle.h"
InputSize::InputSize(QWidget *parent)
	: QWidget(parent)
{
	ui.setupUi(this);

	setWindowFlags(Qt::FramelessWindowHint);


	this->setFixedSize(228, 97);

	CDarkStyle::setFontFamily(this, "Microsoft YaHei", false);
	CDarkStyle::assign(this);

	this->setAutoFillBackground(true);
}

InputSize::~InputSize()
{
}


void InputSize::slot_ok()
{
	bool ok = false;
	bool ok1 = false;

	int w = ui.widthLe->text().toInt(&ok);
	int h = ui.heightLe->text().toInt(&ok1);

	if (ok&&ok1)
	{
		emit resize(w,h);
	}
	close();
}

